package com.hospital.hospitaldrugservice.config;

import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 分页
 */
@Configuration
@MapperScan("com.hospital.hospitaldrugservice.mapper")
public class MybatisPlusConfig {

    @Bean
    public PaginationInterceptor paginationInterceptor(){
        //创建分页拦截器对象
        PaginationInterceptor PaginationInterceptor = new PaginationInterceptor();
        return PaginationInterceptor;
    }
}
